#ifndef JAE_HELPER_H_
#define JAE_HELPER_H_

#define SQR(x) (x*x)

#include "logger.h"

#include <GL/gl.h>
#include <GL/glu.h>

/****************************************************//**
 * Project-Namespace
 ********************************************************/
namespace jae
{

//Structs -------------------------------------------------------------------
struct Vector3D 
{
    GLfloat x;
    GLfloat y;
    GLfloat z;
};

struct Vector2D 
{
    GLfloat x;
    GLfloat y;
};


//Vector Methods: ------------------------------------------------------------
Vector3D vectorCreate3D(GLfloat aX, GLfloat aY, GLfloat aZ);
GLfloat vectorGetLength(Vector3D* aVector);
Vector3D vectorNormalize(Vector3D aVector);
Vector3D operator+ (Vector3D aVectorA, Vector3D aVectorB);
Vector3D operator- (Vector3D aVectorA, Vector3D aVectorB);
Vector3D operator* (Vector3D aVector, GLfloat aValue);
GLfloat operator* (Vector3D aVectorA, Vector3D aVectorB);
bool operator== (Vector3D aVectorA, Vector3D aVectorB);
Vector3D vectorCrossProduct (Vector3D* aVectorA, Vector3D* aVectorB);
void vectorWrite(Vector3D& aVector);

//GL Methods: ----------------------------------------------------------------
void setDefaultMaterialValues();
void checkGLErrors(const char* aFunctionName);

//Math Methods: --------------------------------------------------------------
void normalizeAngle(GLfloat *aAngle);

//Filename Methods: ----------------------------------------------------------
std::string splitFileName(const std::string& aFile);
std::string splitFileExtension(const std::string& aFile);
std::string splitFolderName(const std::string& aFile);


} //namespace

#endif /*JAE_HELPER_H_*/
